package com.hotel.tv.entities;

import com.autumn.domain.entities.AbstractDefaultEntity;
import com.autumn.mybatis.mapper.annotation.Index;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 订单项目
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-07 10:54
 **/
@Getter
@Setter
@Table(name = "b_order_item")
public class OrderItem extends AbstractDefaultEntity {

    @GeneratedValue(strategy = GenerationType.TABLE)
    @Override
    public Long getId() {
        return super.getId();
    }

    /**
     * 字段 orderId (订单id)
     */
    public static final String FIELD_ORDER_ID = "orderId";

    @Index
    private Long orderId;

    /**
     *
     */
    @Column(nullable = false)
    @Index
    private Long itemUserId;

    /**
     * 项目名称
     */
    @Column(nullable = false, length = 100)
    private String itemName;

    /**
     * 项目金额
     */
    @Column(nullable = false)
    private BigDecimal itemNumber;

}
